package com.zbl.parser;

import com.xuxueli.crawler.parser.strategy.NonPageParser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 * @Author: zhangjun
 * @Date: 2020/7/31 13:42
 * @Description:
 */
public class CourseChapterJsoupParse extends NonPageParser {

    @Override
    public void parse(String url, String pageSource) {
        Document document = Jsoup.parse(pageSource);
        Elements lists = document.select(".video li");
        for (Element li : lists) {
            System.out.println("章节名称：" + li.select("a").text());
        }
    }
}
